package calculatorSim;

public class Subtraction {
	//instance variables
	private int sub;
	private int num1;
	private int num2;

	//constructor
	public Subtraction(int x, int y){
		this.num1 = x;
		this.num2 = y;
		this.sub = 0;
	}
	
	// subtract the numbers
	public int subNums(){
		this.sub = this.num1 - this.num2;
		return this.sub;
	}
	//display
	public void showResults(){
		System.out.println("The difference is: " + subNums());
	}


}
